AUX_SOURCE_DIRECTORY(. QEDIS_SRC)

INCLUDE(${PROJECT_SOURCE_DIR}/CMakeCommon)

LINK_DIRECTORIES(../../leveldb)
LINK_DIRECTORIES(../../rocksdb)

ADD_LIBRARY(qediscore SHARED ${QEDIS_SRC})
SET(LIBRARY_OUTPUT_PATH ../../bin)

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/QBase)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/leveldb/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/rocksdb/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/rocksdb/include/utilities)

ADD_DEPENDENCIES(qediscore qbaselib leveldb rocksdb)
TARGET_LINK_LIBRARIES(qediscore; qbaselib; dl; leveldb; rocksdb)

SET_TARGET_PROPERTIES(qediscore PROPERTIES LINKER_LANGUAGE CXX)
